package com.dqhl.community.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.dqhl.community.R;
import com.dqhl.community.base.BaseMyAdapter;

/**
 * Created by LIENLIN on 2016/9/2.
 */
public class ShoppingAroundAdapter extends BaseMyAdapter implements View.OnClickListener {

    private ImageView mIvCollection;//收藏按钮

    public ShoppingAroundAdapter(Context context) {
        super(context);
    }

    @Override
    public int getCount() {
        return 6;
    }

    @Override
    public Object getItem(int i) {
        return null;
    }

    @Override
    public long getItemId(int i) {
        return i;
    }

    @Override
    public View getView(int i, View view, ViewGroup viewGroup) {

        View v= inflater.inflate(R.layout.shopping_lv_item,viewGroup,false);
        mIvCollection = (ImageView) v.findViewById(R.id.iv_shopping_collection);
        mIvCollection.setOnClickListener(this);
        return v;
    }

    @Override
    public void onClick(View view) {

        switch (view.getId()){
            case R.id.iv_shopping_collection:
                toast("收藏");
                break;
        }
    }
}
